package com.zbw.service.impl;

import com.zbw.domain.Message;
import com.zbw.mapper.MessageMapper;
import com.zbw.service.IMessageService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class MessageServiceImpl implements IMessageService {
    @Resource
    private MessageMapper messageMapper;
    /**
     * 查询留言板信息
     *
     * @param userId
     * @return
     */
    @Override
    public List<Message> queryByUser(String userName) {
        return messageMapper.queryByUser(userName);
    }


    @Override
    public void insertMsg(Message message) {
        messageMapper.insert(message);
    }

    @Override
    public void update(Message message) {
        messageMapper.update(message);
    }
}
